package com.donn.securitycontrolplatform.hisalarm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author zhenglx
 * @since 2022-06-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "THisAlarm对象", description = "")
public class THisAlarm implements Serializable {

    //人员报警
    public static final Integer ALARM_TYPE_PERSON = 1000;

    //设备报警
    public static final Integer ALARM_TYPE_EQUIPMENT = 2000;


    //报警状态 未处理
    public static final Integer STATUS_0 = 0;

    //报警状态 已处理
    public static final Integer STATUS_1 = 1;

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    //创建时间

    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate;
    //设备编号
    private String equipmentNum;

    //标签id
    private String tagid;

    //围栏id
    private Integer fenceId;

    //报警详细类型
    private Long alarmType;

    @ApiModelProperty(value = "状态 默认未处理")
    private Integer status = STATUS_0;

    //开始时间
    private String startTime;

    //操作人
    private String operater;

    //操作时间
    private LocalDateTime operateTime;

    //设备名称
    private String deviceName;

    //抓拍图片相对路径
    private String imgUrl;

    @TableField(exist = false)
    //报警名称
    private String name;


}
